﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UniversaleMain.Master" AutoEventWireup="true" CodeBehind="TransactionReport1.aspx.cs" Inherits="FYPDemo.WebForm12" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1 class="h1_title">Daily Transaction Report</h1>
    <table style="width:100%;">
        <tr>
            <td colspan="3">
                <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                </asp:ToolkitScriptManager>
            </td>
        </tr>
        <tr>
            <td style="width:100px">
                <asp:Label ID="Label1" runat="server" Text="Order ID:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtOrderID" runat="server"></asp:TextBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                Date Created:</td>
            <td>
                <asp:Label ID="Label2" runat="server" Text="Date From:"></asp:Label>
&nbsp;<asp:TextBox ID="txtDateCreatedFrom" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="txtDateCreatedFrom_CalendarExtender" runat="server" 
                    TargetControlID="txtDateCreatedFrom">
                </asp:CalendarExtender>
&nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label3" runat="server" Text="Date To:"></asp:Label>
&nbsp;<asp:TextBox ID="txtDateCreatedTo" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="txtDateCreatedTo_CalendarExtender" runat="server" 
                    TargetControlID="txtDateCreatedTo">
                </asp:CalendarExtender>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label4" runat="server" Text="Status:"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlStatus" runat="server">
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label5" runat="server" Text="Date Paid:"></asp:Label>
            </td>
            <td>
                <asp:Label ID="Label6" runat="server" Text="Date From:"></asp:Label>
&nbsp;<asp:TextBox ID="txtDatePaidFrom" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="txtDatePaidFrom_CalendarExtender" runat="server" 
                    TargetControlID="txtDatePaidFrom">
                </asp:CalendarExtender>
&nbsp;&nbsp;&nbsp;
                <asp:Label ID="Label7" runat="server" Text="Date To:"></asp:Label>
&nbsp;<asp:TextBox ID="txtDatePaidTo" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="txtDatePaidTo_CalendarExtender" runat="server" 
                    TargetControlID="txtDatePaidTo">
                </asp:CalendarExtender>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click" 
                    Text="Search" CssClass="buttonbg" />
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
            <div>
                <asp:GridView ID="OrderSelection_GView" runat="server" 
                    AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
                    DataKeyNames="OrderID" GridLines="None" 
                    OnRowCommand="OrderSelection_GView_RowCommand">
                    <AlternatingRowStyle BackColor="White" />
                <Columns>
                <asp:TemplateField HeaderText = "No.">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Order ID">
                <ItemTemplate>
                    <asp:LinkButton ID="lbOrderID" runat="server" Text='<%#Eval("OrderID") %>'
                    CommandArgument = "<%# ((GridViewRow) Container).RowIndex  %>" CommandName = "Select" ></asp:LinkButton>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Status">
                <ItemTemplate>
                    <asp:Label ID="lblA2" runat="server"><%#Eval("Status") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Total Price">
                <ItemTemplate>
                    <asp:Label ID="lblA3" runat="server">RM&nbsp;<%#Eval("TotalPrice") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Date Created">
                <ItemTemplate>
                    <asp:Label ID="lblA4" runat="server"><%#Eval("DateCreated") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Date Paid">
                <ItemTemplate>
                    <asp:Label ID="lblA5" runat="server"><%#Eval("DatePaid") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                </Columns>
                    <EditRowStyle BackColor="#7C6F57" />
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#E3EAEB" />
                    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F8FAFA" />
                    <SortedAscendingHeaderStyle BackColor="#246B61" />
                    <SortedDescendingCellStyle BackColor="#D4DFE1" />
                    <SortedDescendingHeaderStyle BackColor="#15524A" />
                </asp:GridView>
                </div>
                <br />
                <div id="MemberText" runat="server" style="display:none">
        <asp:Label ID="lblMemberText" runat="server" Text="No record found."></asp:Label>
    </div>
                <div>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                        CellPadding="4" ForeColor="#333333" GridLines="None">
                    <AlternatingRowStyle BackColor="White" />
                <Columns>

                <asp:TemplateField HeaderText = "No.">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Product ID">
                <ItemTemplate>
                    <asp:Label ID="lblA3" runat="server"><%#Eval("ProductID") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Unit Price">
                <ItemTemplate>
                    <asp:Label ID="lblA4" runat="server"><%#Eval("UnitPrice") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Quantity">
                <ItemTemplate>
                    <asp:Label ID="lblA5" runat="server"><%#Eval("Quantity") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText = "Date Created">
                <ItemTemplate>
                    <asp:Label ID="lblA6" runat="server"><%#Eval("DateCreated") %></asp:Label>
                </ItemTemplate>
                </asp:TemplateField>

                </Columns>
                    <EditRowStyle BackColor="#7C6F57" />
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#E3EAEB" />
                    <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#F8FAFA" />
                    <SortedAscendingHeaderStyle BackColor="#246B61" />
                    <SortedDescendingCellStyle BackColor="#D4DFE1" />
                    <SortedDescendingHeaderStyle BackColor="#15524A" />
                </asp:GridView>
                </div>
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
